# -*- coding: utf-8 -*-
# @Time    : 2022/4/2 10:49
# @Author  : zyw
# @Email   : panda_kings@163.com
# @File    : migrate.py
# 进行迁移
from flask_migrate import Migrate,MigrateCommand
# 使用manager 管理整个项目
from flask_script import Manager

from main import app
from common.models import db
# 注意一定要把模型类导入
from common.models.users import User,OauthUser
# from common.models.news import NewsInfo,Comment,Collect
# from common.models.channeles import Channels,UserChannel


manage = Manager(app)
migrate = Migrate(app, db)
# 指定迁移时要使用命令
manage.add_command('db', MigrateCommand)

if __name__ == '__main__':
    # 迁移执行的命令
    manage.run()








